a = 100

def outer():
    b = 10
    def inner():
        nonlocal  b # 声明外部函数的局部变更
        print("inner b:", b)
        b = 20

        global a
        a = 1000
    inner()
    print("outer b:", b)


outer()
print("a=",a)